package com.kanq.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kanq.mapper.KanqAiFileChunkKeywordsMapper;
import com.kanq.pojo.entity.KanqAiFileChunkKeywords;
import com.kanq.service.KanqAiFileChunkKeywordsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * KB文件片段关键字服务类
 * 该类负责处理与文件片段关键字相关的业务逻辑
 */
@Service
@Slf4j
public class KanqAiFileChunkKeywordsServiceImpl extends ServiceImpl<KanqAiFileChunkKeywordsMapper, KanqAiFileChunkKeywords> implements KanqAiFileChunkKeywordsService {


    @Override
    public List<String> getKeywordsByChunkId(Long id) {
        return baseMapper.getKeywordsByChunkId(id);
    }

    @Override
    public void saveKeywords(List<KanqAiFileChunkKeywords> keywordsList) {
        this.saveBatch(keywordsList);
    }
}
